var express = require('express');
var router = express.Router();
let { getsOrders, confirmAlterOrders, deleteOrders } = require('../service/ordersService')
//页面渲染
router.get('/getsOrders', async function (req, res, next) {
    // console.log(req.body, 111);
    let data = await getsOrders(req.body);
    res.send(data)
});

//修改订单
router.post('/confirmAlterOrders', async function (req, res, next) {
    // console.log(req.body, 111);
    let data = await confirmAlterOrders(req.body);
    res.send(data);
});

// 根据ID删除订单
router.post('/deleteOrders', async function (req, res, next) {
    let data = await deleteOrders(req.body);
    res.send(data);
});

module.exports = router;